#include <iostream>
using namespace std;
class Corrdinate{
protected:
    int x;
    int y;
public:
    Corrdinate(int a,int b)
    {
        cout<<"Construct Corrdinate!"<<endl;
        x = a;
        y = b;
    }
    ~Corrdinate()
    {
        cout<<"Destroy Corrdinate!"<<endl;
    }
};
class Shape{
public:
    Shape()
    {
        cout<<"Construct Shape"<<"\n";
    }
    virtual void Area(){
        std::cout<<"Area Output:"<<"\n";
    }
    virtual ~Shape(){
        cout<<"Delete Shape!\n"<<"\n";
    }
};
class Circle:public Shape
{
protected:
    double r;
    Corrdinate *co;
public:
    Circle(int radius){

        r = radius;
        co = new Corrdinate(3,5);
        cout<<"Construct Circle!"<<endl;
    }
    virtual void Area()
    {
        cout<<"Area:"<<r*r*3.14<<"\n";
    }
    ~Circle(){
        cout<<"Delete Circle!"<<"\n";
        delete co;
    }

};
class Rect:public Shape
{
protected:
    int height;
    int width;
public:
    Rect(int h,int w)
    {
        cout<<"Construct Rectangle!"<<"\n";
        height = h;
        width = w;
    }
    ~Rect(){
        cout<<"Delete Rectange!"<<"\n";
    }
    virtual void Area()
    {
        cout<<"Area:"<<width*height<<endl;
    }
};
int main() {
    Shape *c = new Circle(3);
    Shape *r = new Rect(4,5);
    c->Area();
    r->Area();
    delete c;
    delete r;
    return 0;
}